package arithmetic;

import java.util.Scanner;

//题目：输入一行字符，分别统计出其中英文字母、空格、数字和其它字符的个数
public class Arithmetic9 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();

        int letterCount = 0;
        int spaceCount = 0;
        int numCount = 0;
        int otherCount = 0;
        char[] c = s.toCharArray();
        for (int i = 0; i <c.length ; i++) {
            if (Character.isLetter(c[i])){
                letterCount++;
            }else if (Character.isDigit(c[i])){
                numCount++;
            }else if (Character.isSpaceChar(c[i])){
                spaceCount++;
            }else {
                otherCount++;
            }

        }
        System.out.println("英文字母有："+letterCount);
        System.out.println("数字有："+numCount);
        System.out.println("空格有："+spaceCount);
        System.out.println("其他字符："+otherCount);

    }

}
